const serve = require('koa-static');
const Koa = require('koa');
const router = require('./src/router')
const views = require('koa-views');
const { koaBody } = require('koa-body');
const auth = require('./src/middle/auth')

const app = new Koa();




app
  .use(serve(__dirname + '/src/assets'))
  .use(auth())
  .use(views(__dirname + '/src/views'))
  .use(koaBody())
  .use(router.routes())
  .listen(7001, () => {
    console.log('http://localhost:7001');
  });